home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-30 | 26.1 KB | 1,031 lines |
- diff -c -r 28sep90/makefile s2c/makefile
- *** 28sep90/makefile Tue Apr 10 16:48:28 1990
- --- s2c/makefile Tue Nov 13 23:14:42 1990
- ***************
- *** 16,22 ****
- --- 16,51 ----
- VAXBIN = /wrl/vax/bin
- VAXLIB = /wrl/vax/lib
-
- + # Architecture specific makefiles are constructed by the
- + # following commands.
-
- + inplaceCPU:
- + test -f makefile-tail || cp makefile makefile-tail
- + echo "BINDIR = ${BINDIR}" > makefile
- + echo "LIBDIR = ${LIBDIR}" >> makefile
- + cat makefile-tail >> makefile
- + test -f doc/makefile-tail || cp doc/makefile doc/makefile-tail
- + echo "SRCDIR = ${SRCDIR}/doc" > doc/makefile
- + cat doc/makefile-tail >> doc/makefile
- + cat ${CPU} > scrt/makefile
- + echo "SRCDIR = ${SRCDIR}/scrt" >> scrt/makefile
- + echo "CPUDIR = ${CPUDIR}/scrt" >> scrt/makefile
- + echo "BINDIR = ${BINDIR}" >> scrt/makefile
- + echo "LIBDIR = ${LIBDIR}" >> scrt/makefile
- + cat scrt/makefile-tail >> scrt/makefile
- + cat ${CPU} > scsc/makefile
- + echo "SRCDIR = ${SRCDIR}/scsc" >> scsc/makefile
- + echo "CPUDIR = ${CPUDIR}/scsc" >> scsc/makefile
- + echo "BINDIR = ${BINDIR}" >> scsc/makefile
- + echo "LIBDIR = ${LIBDIR}" >> scsc/makefile
- + cat scsc/makefile-tail >> scsc/makefile
- + cat ${CPU} > test/makefile
- + echo "SRCDIR = ${SRCDIR}/test" >> test/makefile
- + echo "CPUDIR = ${CPUDIR}/test" >> test/makefile
- + echo "BINDIR = ${BINDIR}" >> test/makefile
- + echo "LIBDIR = ${LIBDIR}" >> test/makefile
- + cat test/makefile-tail >> test/makefile
- +
- # Architecture specific directories and links to the source files are
- # constructed by the following commands which follow:
-
- ***************
- *** 74,79 ****
- --- 103,123 ----
- forVAX:
- make "CPU = VAX" "CPUDIR = ${VAXDIR}" \
- "BINDIR = ${VAXBIN}" "LIBDIR = ${VAXLIB}" forCPU
- +
- + forI386:
- + make "CPU = I386" "CPUDIR = /usr/local/src/24mar90" \
- + "SRCDIR = /usr/local/src/24mar90" \
- + "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
- +
- + forISC386IX:
- + make "CPU = ISC386IX" "CPUDIR = /home/28sep90" \
- + "SRCDIR = /home/28sep90" \
- + "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
- +
- + forSPARC:
- + make "CPU = SPARC" "CPUDIR = /var/tmp/24mar90" \
- + "SRCDIR = /var/tmp/24mar90" \
- + "BINDIR = /usr/local/bin" "LIBDIR = /usr/local/lib" inplaceCPU
-
- # The Scheme->C system is initially compiled from the C sources by the
- # following:
- diff -c -r 28sep90/scrt/apply.h s2c/scrt/apply.h
- *** 28sep90/scrt/apply.h Fri Sep 21 15:51:11 1990
- --- s2c/scrt/apply.h Tue Nov 13 23:13:15 1990
- ***************
- *** 44,49 ****
- --- 44,57 ----
- by the compiler to call unknown functions.
- */
-
- + #ifdef SPARC
- + #define MAXARGS 25
- + #endif
- +
- + #ifdef I386
- + #define MAXARGS 25 /* gcc doesn't appear to set any limit */
- + #endif
- +
- #ifdef MIPS
- #define MAXARGS 25 /* Maximum number of required arguments permitted.
- Note that this does not preclude an optional
- diff -c -r 28sep90/scrt/callcc.c s2c/scrt/callcc.c
- *** 28sep90/scrt/callcc.c Fri Sep 21 15:51:55 1990
- --- s2c/scrt/callcc.c Tue Nov 13 23:13:20 1990
- ***************
- *** 57,62 ****
- --- 57,70 ----
- #include "callcc.h"
- #include "apply.h"
- #include "signal.h"
- +
- + #ifdef SPARC
- + extern sc_setjmp();
- + #pragma unknown_control_flow(sc_setjmp)
- + #define setjmp( x ) sc_setjmp( x )
- + #define longjmp( x, y ) sc_longjmp( x, y )
- + #endif
- +
- #ifdef MIPS
- extern sc_setsp();
- #endif
- diff -c -r 28sep90/scrt/cio.c s2c/scrt/cio.c
- *** 28sep90/scrt/cio.c Fri Sep 21 15:52:03 1990
- --- s2c/scrt/cio.c Tue Nov 13 23:13:26 1990
- ***************
- *** 46,51 ****
- --- 46,69 ----
- #include <sys/time.h>
- #include "objects.h"
-
- + #if ISC386IX
- + #include <stropts.h>
- + #include <poll.h>
- + #include <errno.h>
- +
- + int rename(old, new) char *old, *new;
- + {
- + if (link(old, new) < 0)
- + if (errno == EEXIST && unlink(new) == 0 && link(old, new) < 0)
- + return 0;
- + else
- + return -1;
- + else if (unlink(old) == 0)
- + return 0;
- + return -1;
- + }
- + #endif
- +
- int sc_libc_eof = EOF;
-
- /* feof(stream) */
- ***************
- *** 88,100 ****
- --- 106,128 ----
- FILE *stream;
- {
- int readfds, nfound;
- + #if ! ISC386IX
- struct timeval timeout;
- + #else
- + struct pollfd pollfd;
- + #endif
-
- if (((stream)->_cnt) <= 0) {
- + #if ! ISC386IX
- readfds = 1<<(fileno( stream ));
- timeout.tv_sec = 0;
- timeout.tv_usec = 0;
- nfound = select( fileno( stream )+1, &readfds, 0, 0, &timeout );
- + #else
- + pollfd.fd = fileno( stream );
- + pollfd.events = POLLIN;
- + nfound = poll(&pollfd, 1, 0);
- + #endif
- if (nfound == 0) return( 0 );
- }
- return( 1 );
- diff -c -r 28sep90/scrt/heap.c s2c/scrt/heap.c
- *** 28sep90/scrt/heap.c Fri Sep 21 15:54:45 1990
- --- s2c/scrt/heap.c Tue Nov 13 23:13:33 1990
- ***************
- *** 100,108 ****
- --- 100,110 ----
-
- int sc_gcinfo; /* controls logging */
-
- + #if ! SYSV
- static struct rusage gcru, /* resource consumption during collection */
- startru,
- stopru;
- + #endif
-
- int *sc_stackbase; /* pointer to base of the stack */
-
- ***************
- *** 111,116 ****
- --- 113,119 ----
-
- TSCP sc_after_2dcollect_v; /* Collection status callback */
-
- + #if ! SYSV
- /* The following function converts a rusage structure into an 18 word Scheme
- vector composed of the same items.
- */
- ***************
- *** 240,245 ****
- --- 243,252 ----
- {
- return( rusagevector( &gcru ) );
- }
- + #else
- + #define getrusage(x,y) /* no operation */
- + #define updategcru() /* no operation */
- + #endif /* SYSV-BSD dependency */
-
- /* Errors detected during garbage collection are logged by the following
- procedure. If any errors occur, the program will abort after logging
- ***************
- *** 402,407 ****
- --- 409,455 ----
- }
- #endif MIPS
-
- + #ifdef SPARC
- + /* All processor registers which might contain pointers are traced by the
- + following procedure.
- + */
- +
- + static trace_stack_and_registers()
- + {
- + int i, *pp;
- + jmp_buf tmp;
- +
- + pp = STACKPTR;
- + while (pp != sc_stackbase) move_continuation_ptr( *pp++ );
- + }
- + #endif SPARC
- +
- + #ifdef I386
- + /* The following code is used to read the stack pointer. The register
- + number is passed in to force an argument to be on the stack, which in
- + turn can be used to find the address of the top of stack.
- + */
- +
- + int *sc_processor_register( reg )
- + int reg;
- + {
- + return( ® );
- + }
- +
- + /* All processor registers which might contain pointers are traced by the
- + following procedure.
- + */
- +
- + static trace_stack_and_registers()
- + {
- + int i, *pp;
- + jmp_buf tmp;
- +
- + setjmp(tmp);
- + pp = STACKPTR;
- + while (pp != sc_stackbase) move_continuation_ptr( *pp++ );
- + }
- + #endif I386
-
- /* The size of an extended object in words is returned by the following
- function.
- ***************
- *** 1421,1426 ****
- --- 1469,1475 ----
- getrusage( 0, &stopru );
- updategcru();
- if (sc_gcinfo) {
- + #if ! SYSV
- fprintf( stderr,
- " %d%% locked %d%% retained %d user ms",
- (sc_lockcnt*100)/sc_heappages,
- ***************
- *** 1430,1435 ****
- --- 1479,1490 ----
- " %d system ms %d page faults\n",
- stopru.ru_stime.tv_sec*1000+stopru.ru_stime.tv_usec/1000,
- stopru.ru_majflt );
- + #else
- + fprintf( stderr,
- + " %d%% locked %d%% retained\n",
- + (sc_lockcnt*100)/sc_heappages,
- + (sc_generationpages*100)/sc_heappages);
- + #endif
- }
- if (sc_gcinfo == 2) {
- /* Perform additional consistency checks */
- diff -c -r 28sep90/scrt/heap.h s2c/scrt/heap.h
- *** 28sep90/scrt/heap.h Fri Sep 21 15:54:58 1990
- --- s2c/scrt/heap.h Tue Nov 13 23:13:38 1990
- ***************
- *** 42,50 ****
- --- 42,57 ----
- /* Import definitions */
-
- #ifndef rusage
- + #ifdef SPARC
- + #include <sys/time.h>
- + #include <sys/resource.h>
- + #else
- + #ifndef SYSV
- #include <time.h>
- #include <sys/resource.h>
- #endif
- + #endif
- + #endif
-
- /* This module implements the object storage storage system for SCHEME->C.
-
- ***************
- *** 306,311 ****
- --- 313,326 ----
- */
-
- extern int *sc_stackbase;
- +
- + #ifdef I386
- + #define STACKPTR sc_processor_register( 4 )
- + #endif
- +
- + #ifdef SPARC
- + #define STACKPTR sc_processor_register( 0 )
- + #endif
-
- #ifdef MIPS
- #define STACKPTR sc_processor_register( 29 )
- diff -c -r 28sep90/scrt/makefile-tail s2c/scrt/makefile-tail
- *** 28sep90/scrt/makefile-tail Tue Nov 20 01:30:39 1990
- --- s2c/scrt/makefile-tail Tue Nov 13 23:13:44 1990
- ***************
- *** 66,77 ****
- Xsci: ${Sruntimec} ${Sruntime} ${Cruntime} ${Aruntime} \
- sci.c sci.o
- ${CC} -o Xsci ${CFLAGS} ${Sruntime} ${Cruntime} ${Aruntime} sci.o \
- ! -lm
-
- GGCi: ${Sruntimec} ${Sruntime} ${Aruntime} GGC.o sci.c sci.o
- make "CFLAGS = -DGGC ${CFLAGS}" GGCheap.o GGCscinit.o
- ${CC} -o GGCi ${CFLAGS} ${Sruntime} ${GGCCruntime} ${Aruntime} sci.o \
- ! -lXaw -lXt -lX11 -lm
-
- Xmv: Xsci Xlibsc.a
- mv Xsci sci
- --- 66,77 ----
- Xsci: ${Sruntimec} ${Sruntime} ${Cruntime} ${Aruntime} \
- sci.c sci.o
- ${CC} -o Xsci ${CFLAGS} ${Sruntime} ${Cruntime} ${Aruntime} sci.o \
- ! ${CLIBS}
-
- GGCi: ${Sruntimec} ${Sruntime} ${Aruntime} GGC.o sci.c sci.o
- make "CFLAGS = -DGGC ${CFLAGS}" GGCheap.o GGCscinit.o
- ${CC} -o GGCi ${CFLAGS} ${Sruntime} ${GGCCruntime} ${Aruntime} sci.o \
- ! -lXaw -lXt -lX11 ${CLIBS}
-
- Xmv: Xsci Xlibsc.a
- mv Xsci sci
- diff -c -r 28sep90/scrt/objects.h s2c/scrt/objects.h
- *** 28sep90/scrt/objects.h Fri Sep 21 15:56:06 1990
- --- s2c/scrt/objects.h Tue Nov 13 23:13:51 1990
- ***************
- *** 44,52 ****
- --- 44,60 ----
-
- /* Default the value of CPUTYPE if not currently defined. */
-
- + #ifndef SPARC
- + #ifndef I386
- #ifndef MIPS
- #ifndef TITAN
- #ifndef VAX
- + #ifdef sparc
- + #define SPARC 1
- + #endif
- + #ifdef i386
- + #define I386 1
- + #endif
- #ifdef mips
- #define MIPS 1
- #endif
- ***************
- *** 59,64 ****
- --- 67,81 ----
- #endif
- #endif
- #endif
- + #endif
- + #endif
- +
- + #ifdef SPARC
- + #define MATHTRAPS 0
- + #endif
- + #ifdef I386
- + #define MATHTRAPS 0
- + #endif
-
- /* The Scheme->C installer may elect to have arithmetic overflow handled
- gracefully on either the MIPS or the VAX implementations. The default
- ***************
- *** 71,76 ****
- --- 88,102 ----
-
- /* A machine dependent definition: the setjmp/longjmp buffer. */
-
- + #ifdef SPARC
- + typedef int jmp_buf[2+7+8+8+1];
- + #define DOUBLE_ALIGN 1
- + #endif
- +
- + #ifdef I386
- + #include <setjmp.h>
- + #define CPUTYPE I386
- + #endif
- #ifdef MIPS
- #include <setjmp.h>
- #define CPUTYPE MIPS
- ***************
- *** 130,141 ****
- --- 156,177 ----
- unsigned gned;
- } unsi;
- struct { /* EXTENDEDOBJ */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned rest:24;
- + #else
- + unsigned rest:24;
- + unsigned tag:8;
- + #endif
- } extendedobj;
- struct { /* SYMBOL */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned rest:24;
- + #else
- + unsigned rest:24;
- + unsigned tag:8;
- + #endif
- TSCP name;
- TSCP *ptrtovalue;
- TSCP value;
- ***************
- *** 142,172 ****
- --- 178,234 ----
- TSCP propertylist;
- } symbol;
- struct { /* STRING */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- char char0;
- } string;
- struct { /* VECTOR */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- TSCP element0;
- } vector;
- struct { /* PROCEDURE */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned required:8;
- unsigned optional:16;
- + #else
- + unsigned optional:16;
- + unsigned required:8;
- + unsigned tag:8;
- + #endif
- TSCP (*code)();
- TSCP closure;
- } procedure;
- struct { /* CLOSURE */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- TSCP closure;
- TSCP var0;
- } closure;
- struct { /* CONTINUATION */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- TSCP continuation;
- jmp_buf savedstate;
- int *address;
- ***************
- *** 174,196 ****
- --- 236,278 ----
- int word0;
- } continuation;
- struct { /* FLOAT32 */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned rest:24;
- + #else
- + unsigned rest:24;
- + unsigned tag:8;
- + #endif
- float value;
- } float32;
- struct { /* FLOAT64 */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned rest:24;
- + #else
- + unsigned rest:24;
- + unsigned tag:8;
- + #endif
- double value;
- } float64;
- struct { /* FORWARD */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- TSCP forward;
- } forward;
- struct { /* WORDALIGN */
- + #ifndef SPARC
- unsigned tag:8;
- unsigned length:24;
- + #else
- + unsigned length:24;
- + unsigned tag:8;
- + #endif
- } wordalign;
- struct { /* PAIR */
- TSCP car;
- ***************
- *** 208,213 ****
- --- 290,303 ----
- #define U_TX( scp ) ((TSCP)((char*)(scp)+EXTENDEDTAG))
- #define U_TP( scp ) ((TSCP)((char*)(scp)+PAIRTAG))
- #define T_U( tscp ) ((SCP)((int)(tscp) & (~TAGMASK)))
- + #ifdef SPARC
- + #define TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
- + #define TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
- + #endif
- + #ifdef I386
- + #define TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
- + #define TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
- + #endif
- #ifdef MIPS
- #define TX_U( tscp ) ((SCP)((char*)tscp-EXTENDEDTAG))
- #define TP_U( tscp ) ((SCP)((char*)tscp-PAIRTAG))
- ***************
- *** 725,730 ****
- --- 815,826 ----
- #define STRING_CHAR( tscp, n ) (*(((unsigned char*)tscp)+FIXED_C( n )+3))
-
- #define VECTOR_LENGTH( tscp ) (TX_U( tscp )->vector.length)
- + #ifdef SPARC
- + #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
- + #endif
- + #ifdef I386
- + #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
- + #endif
- #ifdef MIPS
- #define VECTOR_ELEMENT( tscp, n ) (*((PATSCP)(((char*)( tscp ))+3+((int)n))))
- #endif
- ***************
- *** 752,768 ****
- --- 848,880 ----
-
- /* C declarations */
-
- + #ifndef SPARC
- #define DEFSTRING( name, chars, len ) \
- static struct { unsigned tag:8; \
- unsigned length:24; \
- char char0[len+(4-(len % 4))]; } \
- name = { STRINGTAG, len, chars }
- + #else
- + #define DEFSTRING( name, chars, len ) \
- + static struct { unsigned length:24; \
- + unsigned tag:8; \
- + char char0[len+(4-(len % 4))]; } \
- + name = { len, STRINGTAG, chars }
- + #endif
-
- + #ifndef SPARC
- #define DEFFLOAT( name, value ) \
- static struct { unsigned tag:8; \
- unsigned length: 24; \
- FLOATTYPE f; } \
- name = { FLOATTAG, 0, value }
- + #else
- + #define DEFFLOAT( name, value ) \
- + static struct { unsigned length:24; \
- + unsigned tag:8; \
- + FLOATTYPE f; } \
- + name = { 0, FLOATTAG, value }
- + #endif
-
- #define DEFTSCP( name ) TSCP name
-
- diff -c -r 28sep90/scrt/scinit.c s2c/scrt/scinit.c
- *** 28sep90/scrt/scinit.c Fri Sep 21 15:57:01 1990
- --- s2c/scrt/scinit.c Tue Nov 13 23:13:56 1990
- ***************
- *** 53,58 ****
- --- 53,76 ----
- extern errno; /* C-library Error flag */
-
- extern etext;
- + #ifdef SPARC
- + #define ETEXT ((int)&etext) /* First address after text */
- + #include <sun4/vmparam.h>
- + #define STACKBASE (int*)USRSTACK
- + #endif
- + #ifdef ISC386IX
- + #if I386SHLIB
- + int *sc__etext;
- + #define ETEXT ((int)sc__etext) /* first address after text */
- + #else
- + #define ETEXT ((int)&etext) /* first address after text */
- + #endif
- + #include <sys/types.h>
- + #include <sys/fcntl.h> /* probably should be elsewhere */
- + #include <sys/immu.h>
- + #define STACKBASE (int*)UVSTACK
- + #endif
- + /* ditto for SCO */
- #ifdef MIPS
- #define ETEXT ((int)&etext) /* First address after text */
- #include <mips/param.h>
- ***************
- *** 71,80 ****
- #define STACKBASE (int*)USRSTACK
- #endif
-
- - #include <sys/file.h>
- #include <sys/types.h>
- #include <sys/uio.h>
- #include <strings.h>
- #include <varargs.h>
-
- /* Definitions for objects within sc */
- --- 89,102 ----
- #define STACKBASE (int*)USRSTACK
- #endif
-
- #include <sys/types.h>
- + #include <sys/file.h>
- #include <sys/uio.h>
- + #if ! SYSV
- #include <strings.h>
- + #else
- + #include <string.h>
- + #endif
- #include <varargs.h>
-
- /* Definitions for objects within sc */
- ***************
- *** 183,188 ****
- --- 205,211 ----
-
- static init_procs()
- {
- + #if ! SYSV
- INITIALIZEVAR( U_TX( ADR( t1030 ) ),
- ADR( sc_my_2drusage_v ),
- MAKEPROCEDURE( 0,
- ***************
- *** 192,197 ****
- --- 215,221 ----
- MAKEPROCEDURE( 0,
- 0,
- sc_collect_2drusage, EMPTYLIST ) );
- + #endif
- INITIALIZEVAR( U_TX( ADR( t1034 ) ),
- ADR( sc_collect_v ),
- MAKEPROCEDURE( 0,
- ***************
- *** 721,726 ****
- --- 745,756 ----
- sc_cons(
- sc_cstringtostring( "28sep90jfb" ),
- sc_cons(
- + #ifdef SPARC
- + sc_cstringtostring( "SparcStation-1" ),
- + #endif
- + #ifdef I386
- + sc_cstringtostring( "AT/386" ),
- + #endif
- #ifdef MIPS
- sc_cstringtostring( "DECstation3100" ),
- #endif
- ***************
- *** 731,736 ****
- --- 761,772 ----
- sc_cstringtostring( "VAX" ),
- #endif
- sc_cons(
- + #ifdef SPARC
- + sc_cstringtostring( "SPARC" ),
- + #endif
- + #ifdef I386
- + sc_cstringtostring( "Intel 386" ),
- + #endif
- #ifdef MIPS
- sc_cstringtostring( "R2000" ),
- #endif
- ***************
- *** 741,747 ****
- --- 777,792 ----
- sc_cstringtostring( "VAX" ),
- #endif
- sc_cons(
- + #ifdef SPARC
- + sc_cstringtostring( "SunOS" ),
- + #else
- + #if VAX || TITAN || MIPS
- sc_cstringtostring( "ULTRIX" ),
- + #endif
- + #if SYSV
- + sc_cstringtostring( "System V.3.2" ),
- + #endif
- + #endif
- sc_cons(
- FALSEVALUE,
- EMPTYLIST
- ***************
- *** 752,755 ****
- --- 797,805 ----
- )
- )
- );
- +
- +
- +
- +
- +
- }
- diff -c -r 28sep90/scrt/signal.c s2c/scrt/signal.c
- *** 28sep90/scrt/signal.c Fri Sep 21 16:00:13 1990
- --- s2c/scrt/signal.c Sat Nov 17 12:44:37 1990
- ***************
- *** 92,101 ****
- --- 92,106 ----
- hardware traps.
- */
-
- + #if SYSV
- + void sc_onsignal1( signal )
- + int signal;
- + #else
- void sc_onsignal1( signal, code, scp )
- int signal,
- code;
- struct sigcontext* scp;
- + #endif
- {
- int i;
- struct { /* Save sc_unknowncall's state here */
- ***************
- *** 104,109 ****
- --- 109,122 ----
- int count;
- } save;
-
- + #if SYSV
- + /* Reset the signal, might be more prudent later? */
- + {
- + extern TSCP scrt4_signals_v;
- + scrt4_signal(INT_TSCP(signal),
- + VECTOR_ELEMENT(scrt4_signals_v, INT_TSCP(signal)));
- + }
- + #endif
- if (sc_mutex == 0 && gcinprogress == 0) {
- /* Save sc_unknowncall's state */
- for (i = 0; i < 4; i++) save.proc[ i ] = sc_unknownproc[ i ];
- ***************
- *** 118,124 ****
- --- 131,141 ----
- }
- else {
- /* Signal must be defered */
- + #if SYSV
- + sighold( signal );
- + #else
- sigblock( 1<<signal );
- + #endif
- pendingsignals = pendingsignals | (1<<signal);
- if (gcinprogress == 0) sc_pendingsignals = 1;
- }
- ***************
- *** 150,161 ****
- /* Send the pending signals and exit the critical section */
- sc_pendingsignals = 0;
- self = getpid();
- oldmask = sigblock( -1 ) & ~pendingsignals;
- for (i = 0; i < 32; i++)
- ! if (pendingsignals & (1<<i)) kill( self, i );
- pendingsignals = 0;
- sc_mutex = 0;
- sigsetmask( oldmask );
-
- /* Apply the when-unreferenced procedures */
- while (freed != EMPTYLIST) {
- --- 167,187 ----
- /* Send the pending signals and exit the critical section */
- sc_pendingsignals = 0;
- self = getpid();
- + #if ! SYSV
- oldmask = sigblock( -1 ) & ~pendingsignals;
- + #endif
- for (i = 0; i < 32; i++)
- ! if (pendingsignals & (1<<i)) {
- ! #if SYSV
- ! sigrelse( i );
- ! #endif
- ! kill( self, i );
- ! }
- pendingsignals = 0;
- sc_mutex = 0;
- + #if ! SYSV
- sigsetmask( oldmask );
- + #endif
-
- /* Apply the when-unreferenced procedures */
- while (freed != EMPTYLIST) {
- ***************
- *** 182,191 ****
- --- 208,226 ----
- exceptions.
- */
-
- + #if SYSV
- + sc_trap_handler (sig)
- + int sig;
- + #else
- sc_trap_handler (sig,code,scp)
- int sig, code;
- struct sigcontext *scp;
- + #endif
- {
- + #if SYSV
- + signal(sig, sc_trap_handler);
- + sc_error( "???? (in sc_trap_handler)", "Floating point exception", 0 );
- + #endif
- #if (TITAN || (MATHTRAPS == 0))
- sc_error( "???? (in sc_trap_handler)", "Floating point exception", 0 );
- #endif
- diff -c -r 28sep90/scsc/makefile-tail s2c/scsc/makefile-tail
- *** 28sep90/scsc/makefile-tail Thu Aug 17 14:25:26 1989
- --- s2c/scsc/makefile-tail Tue Nov 13 23:14:09 1990
- ***************
- *** 35,41 ****
- sc-to-c: ${scc}
-
- Xsccomp: ${scc} ${sco} ${rt}
- ! ${CC} -o Xsccomp ${CFLAGS} ${sco} ${rt} -lm
-
- Xsccomp.heap: Xsccomp
- Xsccomp ../scrt/predef.sc ../scrt/objects.h ../scrt/libsc.a \
- --- 35,41 ----
- sc-to-c: ${scc}
-
- Xsccomp: ${scc} ${sco} ${rt}
- ! ${CC} -o Xsccomp ${CFLAGS} ${sco} ${rt} ${CLIBS}
-
- Xsccomp.heap: Xsccomp
- Xsccomp ../scrt/predef.sc ../scrt/objects.h ../scrt/libsc.a \
- diff -c -r 28sep90/test/makefile-tail s2c/test/makefile-tail
- *** 28sep90/test/makefile-tail Mon Apr 9 20:03:14 1990
- --- s2c/test/makefile-tail Tue Nov 13 23:14:15 1990
- ***************
- *** 3,9 ****
- #
-
- sccomp = ../scsc/sccomp
- - CC = cc
- CFLAGS = -g
- rt = ../scrt/libsc.a
- n = n must be defined
- --- 3,8 ----
- ***************
- *** 46,72 ****
- ${sccomp} -schf ${sccomp}.heap -c ${CFLAGS} $*.c
-
- test: test.c test.o testchk.c testchk.o ${batch-c} ${batch-o}
- ! ${CC} -o test ${CFLAGS} test.o testchk.o ${batch-o} ${rt} -lm
-
- testn: testchk.c testchk.o ${rt}
- ! ${sccomp} -schf ${sccomp}.heap -i ${CFLAGS} -o test${n} test${n}.sc \
- testchk.o ${rt}
-
- test50: test50.c test50.o
- ! ${CC} -o test50 ${CFLAGS} test50.o ${rt} -lm
-
- test51: test51.c test51.o
- ! ${CC} -o test51 ${CFLAGS} test51.o ${rt} -lm
-
- test52: test52.c test52.o
- ! ${CC} -o test52 ${CFLAGS} test52.o ${rt} -lm
-
- test53: test53.sc
- ${sccomp} -schf ${sccomp}.heap -i -o test53 ${CFLAGS} test53.sc \
- ! ${rt} -lm
-
- test54: test54.c test54.o test54c.o testchk.o
- ! ${CC} -o test54 ${CFLAGS} test54.o test54c.o testchk.o ${rt} -lm
-
- port:
-
- --- 45,72 ----
- ${sccomp} -schf ${sccomp}.heap -c ${CFLAGS} $*.c
-
- test: test.c test.o testchk.c testchk.o ${batch-c} ${batch-o}
- ! ${CC} -o test ${CFLAGS} test.o testchk.o ${batch-o} ${rt} ${CLIBS}
-
- testn: testchk.c testchk.o ${rt}
- ! ${sccomp} -schf ${sccomp}.heap -cc ${CC} -i ${CFLAGS}\
- ! -o test${n} test${n}.sc \
- testchk.o ${rt}
-
- test50: test50.c test50.o
- ! ${CC} -o test50 ${CFLAGS} test50.o ${rt} ${CLIBS}
-
- test51: test51.c test51.o
- ! ${CC} -o test51 ${CFLAGS} test51.o ${rt} ${CLIBS}
-
- test52: test52.c test52.o
- ! ${CC} -o test52 ${CFLAGS} test52.o ${rt} ${CLIBS}
-
- test53: test53.sc
- ${sccomp} -schf ${sccomp}.heap -i -o test53 ${CFLAGS} test53.sc \
- ! ${rt} ${CLIBS}
-
- test54: test54.c test54.o test54c.o testchk.o
- ! ${CC} -o test54 ${CFLAGS} test54.o test54c.o testchk.o ${rt} ${CLIBS}
-
- port:
-
- diff -c -r 28sep90/test/test16.sc s2c/test/test16.sc
- *** 28sep90/test/test16.sc Thu Feb 22 21:11:07 1990
- --- s2c/test/test16.sc Tue Nov 13 23:14:21 1990
- ***************
- *** 52,57 ****
- --- 52,60 ----
- ;;; *.* Extensions for accessing C structures. At the moment, they assume
- ;;; that the bits are ordered like the VAX.
-
- + (let ((big-endian (member (list-ref (implementation-information) 3)
- + '("SPARC"))))
- +
- (let ((s (make-string 10 #\*)))
- (c-byte-set! s 0 (char->integer #\S))
- (c-byte-set! s 1 (char->integer #\c))
- ***************
- *** 71,84 ****
- (let ((s (make-string 10 #\*)))
- (c-int-set! s 0 #xffff)
- (chk 10 (c-int-ref s 0) #xffff)
- ! (chk 11 (c-shortunsigned-ref s 0) #xffff)
- ! (chk 12 (c-shortunsigned-ref s 2) 0)
- ! (chk 13 (c-shortint-ref s 0) -1)
- ! (chk 14 (c-shortint-ref s 2) 0)
- ! (c-shortint-set! s 2 -1)
- ! (chk 15 (c-int-ref s 0) -1)
- ! (c-shortunsigned-set! s 0 #xfffe)
- ! (chk 16 (c-int-ref s 0) -2))
-
- (let ((s (make-string 10 #\*)))
- (c-unsigned-set! s 0 (- (expt 2 32) 1))
- --- 74,98 ----
- (let ((s (make-string 10 #\*)))
- (c-int-set! s 0 #xffff)
- (chk 10 (c-int-ref s 0) #xffff)
- ! (if big-endian
- ! (begin
- ! (chk 11 (c-shortunsigned-ref s 2) #xffff)
- ! (chk 12 (c-shortunsigned-ref s 0) 0)
- ! (chk 13 (c-shortint-ref s 2) -1)
- ! (chk 14 (c-shortint-ref s 0) 0)
- ! (c-shortint-set! s 0 -1)
- ! (chk 15 (c-int-ref s 0) -1)
- ! (c-shortunsigned-set! s 2 #xfffe)
- ! (chk 16 (c-int-ref s 0) -2))
- ! (begin
- ! (chk 11 (c-shortunsigned-ref s 0) #xffff)
- ! (chk 12 (c-shortunsigned-ref s 2) 0)
- ! (chk 13 (c-shortint-ref s 0) -1)
- ! (chk 14 (c-shortint-ref s 2) 0)
- ! (c-shortint-set! s 2 -1)
- ! (chk 15 (c-int-ref s 0) -1)
- ! (c-shortunsigned-set! s 0 #xfffe)
- ! (chk 16 (c-int-ref s 0) -2))))
-
- (let ((s (make-string 10 #\*)))
- (c-unsigned-set! s 0 (- (expt 2 32) 1))
- ***************
- *** 99,105 ****
-
- (let ((s (make-string 10 #\*))
- (v (make-vector 10 -1)))
- ! (chk 40 (scheme-byte-ref s 1) 10)
- (chk 41 (scheme-byte-ref s 4) (char->integer #\*))
- (chk 42 (scheme-byte-ref s 14) 0)
- (scheme-byte-set! s 5 (char->integer #\^))
- --- 113,121 ----
-
- (let ((s (make-string 10 #\*))
- (v (make-vector 10 -1)))
- ! (if big-endian
- ! (chk 40 (scheme-byte-ref s 2) 10)
- ! (chk 40 (scheme-byte-ref s 1) 10))
- (chk 41 (scheme-byte-ref s 4) (char->integer #\*))
- (chk 42 (scheme-byte-ref s 14) 0)
- (scheme-byte-set! s 5 (char->integer #\^))
- ***************
- *** 123,126 ****
- (chk 55 (bit-or 1 3 5) 7)
- (chk 56 (bit-xor 1 3 5) 7)
- (chk 57 (bit-lsh 1 31) 2147483648.)
- ! (chk 58 (bit-rsh -1 31) 1))
- --- 139,142 ----
- (chk 55 (bit-or 1 3 5) 7)
- (chk 56 (bit-xor 1 3 5) 7)
- (chk 57 (bit-lsh 1 31) 2147483648.)
- ! (chk 58 (bit-rsh -1 31) 1)))
-